package lwx;

import java.lang.reflect.Array;
import java.util.*;

public class test {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNext()) {
            int a = in.nextInt();
            int b = in.nextInt();
            System.out.println(a + b);
        }
    }

//    public static List<String> pokerSort(List<String> pokerCards){
//
//
//    }

//    public static List<String> innerSort(List<String> pokers){
//        for(String str:pokers){
//            endReplace(str);
//
//        }
//    }

    private static void endReplace(String str) {
        if (str.endsWith("A")){
            str="14";
        } else if (str.endsWith("K")) {
            str.replace("K","13");
        }else if (str.endsWith("K")) {
            str.replace("K","12");
        }else if (str.endsWith("J")) {
            str.replace("J","11");
        }
    }

    public static List<String> pokerCardSort(String strs){
        ArrayList<String> res=new ArrayList<>();
        for(String str:strs.split("，")){
            res.add(str);
        }
        for(String str:res){
            if(str.startsWith("大王")){
                str.replaceFirst("大王","90");
            }else if(str.startsWith("小王")){
                str.replace("小王","80");
            } else if (str.startsWith("黑桃")) {
                str.replace("黑桃","4");
            } else if (str.startsWith("红桃")) {
                str.replace("红桃","3");
            }else if (str.startsWith("梅花")) {
                str.replace("梅花","2");
            }else{
                str.replace("方片","1");
            }
            endReplace(str);
        }
        System.out.println(res.toString());
        return res;

    }

    public static List<String> permute(String str) {
        List<String> permutations = new ArrayList<>();
        if (str.length() == 1) {
            permutations.add(str);
        } else {
            for (int i = 0; i < str.length(); i++) {
                String remainingStr = str.substring(0, i) + str.substring(i + 1);
                for (String permutation : permute(remainingStr)) {
                    permutations.add(str.charAt(i) + permutation);
                }
            }
        }
        return permutations;
    }

    public static ArrayList<String> getPermutation0(String A) {
        int n = A.length();
        ArrayList<String> res = new ArrayList<>();
        res.add(A.charAt(0) + "");//初始化,包含第一个字符
        for (int i = 1; i < n; i++) {//第二个字符插入到前面生成集合的每个元素里面
            ArrayList<String> res_new = new ArrayList<>();
            char c = A.charAt(i);//新字符
            for (String str : res) {//访问上一趟集合中的每个字符串
                //  插入到每个位置,形成一个新串
                String newStr = c + str;//加在前面
                res_new.add(newStr);
                newStr = str + c;//加在后面
                res_new.add(newStr);
                //加在中间
                for (int j = 1; j < str.length(); j++) {
                    newStr = str.substring(0, j) + c + str.substring(j);
                    res_new.add(newStr);
                }
            }
            res = res_new;//更新

        }
        return res;
    }

    public static int removeDuplicates(int[] nums) {
        if(nums==null ||nums.length==0){
            return 0;
        }
        int left=0,right=1;
        while(right<=nums.length-1){
            if(nums[left]==nums[right]){
                right++;
            }else{
                left++;
                nums[left]=nums[right];
            }
        }
        for (int i = 0; i < nums.length; i++) {
            System.out.println(nums[i]);
        }
        return left+1;

    }

    public static List<List<String>> groupAnagrams(String[] strs) {

        // 定义哈希集合
        Map<String, List<String>> result = new HashMap();
        // 遍历数组
        for(int i=0; i<strs.length; i++) {
            // 数组字符串排序
            char[] keyArr = strs[i].toCharArray();
            Arrays.sort(keyArr);
            String key = keyArr.toString();
            List<String> stringList = result.getOrDefault(key, new ArrayList<>());
            stringList.add(strs[i]);
            result.put(key, stringList);
        }
        return new ArrayList<>(result.values());
    }
}
